Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix of tests for console commands for pending PR. #1353

Merged
merged 1 commit into from
Jun 2, 2022
Merged

Conversation

nagmat84
Copy link
Collaborator

The pending PR #1351 needs to test some of the console commands to cover all methods in \App\Images as certain methods are only invoked by those commands. (For example, only the command lychee:generate_thumbs checks for the existence of size variants.)

When I tried to write test cases for the console commands, I noticed that

  • the existing tests were never executed, because the name of test class did not end with ...Test.
  • a composer dependency to Mockery was missing which is required to mock and capture the console output of the commands
  • two commands were so fundamentally broken that they could not even be started (oh, oh)

This PR repairs all that in order to keep it out of PR #1351. Also note that I have already split the existing tests for console command into three files, because the tests for the command lychee:generate_thumbs and lychee:takedate will significantly be increased by PR #1351 and hence the deserve their own files already.

@nagmat84 nagmat84 changed the title Fixes for pending PR. Fix of tests for console commands for pending PR. May 29, 2022
@sonarcloud
Copy link

sonarcloud bot commented May 29, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@nagmat84 nagmat84 requested review from kamil4 and qwerty287 May 29, 2022 17:26
@nagmat84 nagmat84 mentioned this pull request May 29, 2022
Copy link
Contributor

@qwerty287 qwerty287 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but untested.

@ildyria ildyria merged commit ec20572 into master Jun 2, 2022
@nagmat84 nagmat84 deleted the fix-console-tests branch June 6, 2022 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants